package pers.cz.testNg;

import org.testng.Assert;
import org.testng.annotations.DataProvider;
import org.testng.annotations.Test;

import java.util.ArrayList;
import java.util.List;

/**
 * @program: PostGirl-panent
 * @description: test1
 * @author: Cheng Zhi
 * @create: 2021-03-08 19:30
 **/
public class Test1 {

    @DataProvider(name = "test1")
    public Object[][] init() {

        List<Integer> list = new ArrayList<Integer>();
        list.add(1);
        list.add(2);
        list.add(3);
        list.add(4);
        Object[][] o = new Object[list.size()][];

        for (int i=0;i<list.size();i++) {
            Object[] objects = new Object[4];
            objects[0] = list.get(i);
            objects[1] = 11;
            objects[2] = 12;
            objects[3] = 13;

            o[i] = objects;
        }
        return o;
    }

    @Test(dataProvider = "test1")
    public void testNg(Integer n, Integer a, Integer b, Integer c) {

        System.out.println(n + "-" + a + "-" + b + "-" + c );
    }


}
